package com.example.onlineeducation.data.model

import android.os.Parcelable
import androidx.recyclerview.widget.DiffUtil
import kotlinx.android.parcel.Parcelize

@Parcelize
data class RegisterSearchGroupListDataModel(
    var groupId: String?,
    var groupName: String?
    ) : Parcelable {

    companion object {
        val diffCallback = object : DiffUtil.ItemCallback<RegisterSearchGroupListDataModel>() {
            override fun areItemsTheSame(
                oldItem: RegisterSearchGroupListDataModel,
                newItem: RegisterSearchGroupListDataModel
            ): Boolean {
                return oldItem.groupId == newItem.groupId
            }

            override fun areContentsTheSame(
                oldItem: RegisterSearchGroupListDataModel,
                newItem: RegisterSearchGroupListDataModel
            ): Boolean {
                return oldItem.groupId == newItem.groupId
                        && oldItem.groupName == newItem.groupName

            }
        }
    }
}